<?php

class Home extends CI_Controller {
	
	public function index(){
		$this->load->model('M_school');
		$data['school_data'] = $this->M_school->get_school();
		$data['title'] = 'Welcome';	
		$this->load->view('vHead', $data);
		$this->load->view('page-blocks/vHeader');
		$this->load->view('page-blocks/vSelection');
		$this->load->view('page-blocks/vFooter');
		$this->load->view('vFoot');
	}
	
	public function login($user = null){
		$this->load->library('gcalib');
		$this->load->model('M_school');
		$data['school_data'] = $this->M_school->get_school();
		if($this->gcalib->verify_user_type($user)){
			$data['title'] = ucfirst($user).' Log In';
			$data['usertype'] = $user;
			$this->load->view('vHead', $data);
			$this->load->view('page-blocks/vHeader');
			$this->load->view('page-blocks/vLogin');
			$this->load->view('page-blocks/vFooter');
			$this->load->view('vFoot');
		}
		else {
			$data['title'] = '404 File not found';
			$this->load->view('vHead', $data);
			$this->load->view('page-blocks/v404');
			$this->load->view('vFoot');
		}

		
		
	}
	
	
	

}

?>